package org.apix;

import org.apix.configuration.PlayerStorageData;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.player.PlayerRespawnEvent;

public class ApixPlayerListener extends PlayerListener {

	public Apix plugin;
	
	public ApixPlayerListener(Apix plugin) {
		this.plugin = plugin;
	}
	
	public void onPlayerRespawn(PlayerRespawnEvent event) {
		Player player = event.getPlayer();
		
		event.setRespawnLocation(PlayerStorageData.getInstance(player).setHome());
	}
}
